home *** CD-ROM | disk | FTP | other *** search
/ The Fatted Calf / The Fatted Calf.iso / Applications / Scheduling / Cassandra / Source / future / convert / Global.h < prev    next >
Encoding:
Text File  |  1990-06-10  |  5.1 KB  |  184 lines

  1. //
  2. // Global.h   Part of Cassandra
  3. //
  4. // Copyright (c) 1989, 1990 by Jiro Nakamura
  5. // All rights reserved
  6. //
  7. // RCS Information
  8. // Revision Number->    $Revision: 2.4 $
  9. // Last Revised->        $Date: 90/05/09 21:48:48 $
  10. //
  11.  
  12.  
  13. #import <appkit/Panel.h>
  14. #import <time.h>
  15. #import <soundkit/Sound.h>
  16. #import "cass.h"
  17.  
  18. #define    CLOCK_ANALOG    0
  19. #define    CLOCK_DIGITAL    1
  20. #define    CLOCK_NONE    2
  21.  
  22. @interface Global:Panel
  23. {
  24.     Sound *soundfile;
  25.     float oldVolumeLeft, oldVolumeRight;    // Previous volume levels
  26.  
  27.     char eventFile[128];
  28.     char eventLogFile[128];
  29.     char notepadFile[128];
  30.     
  31.     /* links to previous and next records and itself */
  32.     EFileLink    present, previous, next;
  33.  
  34.     struct tm ts;        // time structure  see ctime(3) for details
  35.  
  36.     int     lowPriority,        // The lowest priority for an event to
  37.         highPriority,        // be visible. The highest to highlight
  38.         clockBitmapNumber,    // Bitmap number of the clock 
  39.         clockType;        // Clock type 0 = analog, 1 = digital, 2 = none
  40.     float    alarmVolume;        // Volume to play alarm at, 0.0-1.0
  41.                     // -1 = play at system volume
  42.  
  43.     BOOL     showSeconds,        // Show seconds on the display?
  44.         showDate,        // Show date on clock appIcon?
  45.         todayShowTime,        // Should today show the time?
  46.         guru,            // Is the user is a cassandra guru
  47.         overviewOnLaunch,    // Whether to open Overview on launch 
  48.         notepadOnLaunch    ,    // Whether to open Notepad on launch 
  49.         eventLogOnLaunch,    // Whether to open EventLog on launch 
  50.         todayOnLaunch,        // Whether to open Today on launch 
  51.         playAlarm,        // Should we play an alarm sound?
  52.         militaryTime;        // Whether we are operating on 
  53.                     // military or am/pm time
  54.     char alarmSound[128];        // The alarm sound file 
  55.     char msg[MESSAGE_SIZE];        // message buffer     
  56.     char fontName[64];        // The default font to use in windows
  57.     double    fontSize;        // and its size
  58.  
  59.     NXRect    overviewFrame,        // The coordinates and size of the
  60.         eventLogFrame,        // Overview, EventLog,
  61.         notepadFrame,        // Notepad and
  62.         todayFrame;        // Today windows
  63.  
  64.     id     cassandra;        // Set by IB. Cassandra main.
  65.     id    overview;        //   "   "  . The Overview window
  66.     id    eventLog;        //   "   "  . The EventLog window
  67.     id    notepad;        //   "   "  . The Notepad window
  68.     id    today;            //   "   "  . The Today window
  69.     
  70.     id    alarmSoundButton;
  71.     id    alarmSoundForm;
  72.     id    playButton;
  73.     id    setButton;
  74.     id    stopButton;
  75.         
  76.     id    guruButton;
  77.     id     showSecondsButton;
  78.     id    showDateButton;
  79.     id    todayShowTimeButton;
  80.     
  81.     id    overviewOnLaunchButton;
  82.     id    notepadOnLaunchButton;
  83.     id    eventLogOnLaunchButton;
  84.     id    todayOnLaunchButton;
  85.  
  86.     id    clockTypeButton;
  87.     id    clockFaceMatrix;
  88.     id    militaryTimeButton;
  89.     id    showAllButton;
  90.     id    volumeSlider;
  91.     id    volumeTextField;
  92.     id    volumeButton;
  93. }
  94.  
  95. + initialize;        // Initialize ourself and the defaults database
  96.  
  97. - load:sender;        // Load in default values from the defaults database    
  98. - display:sender;    // Open the panel and display these values
  99. - save;            // For compatibility with TextWindow save method
  100. - save:sender;        // Save the values off display
  101. - close;        // Close the panel
  102.  
  103. - saveWindowPositions: sender;    // Call other windows for their position
  104.             // and save the position for future reference
  105. - saveThisWindowPosition: (char *) defaultName : (id) window;    // Save
  106.             // only the calling window.
  107.  
  108. - guru: sender;            // Guru button hit (not implemented)
  109. - windowChanged: sender;    // The window has changed.
  110. - clockTypeChanged: sender;
  111.  
  112. - sound: sender;            // Sound activated/deactivated
  113. - playSound:sender;            // Play the sound
  114. - stopSound:sender;            // Stop playing the sound
  115. - setSound:sender;            // Set the sound
  116. - checkSound:sender;            // Check to see if user has valid
  117.                     // sound path
  118.  
  119. - volumeButtonHit: sender;    // Volume enabled/disabled
  120. - trackVolumeSlider: sender;    // Track the volume slider
  121.  
  122. // ============================
  123. // For info on what these 
  124. // return, see above declarations
  125. // ============================
  126. - (int) lowPriority;
  127. - (int) highPriority;
  128. - (int) clockType;
  129. - (float) volume;
  130. - (const char *)  alarmSound;
  131. - (const char *) eventFile;
  132. - (const char *) eventLogFile;
  133. - (const char *) notepadFile;
  134. - (const char *) clockfaceBitmapName;
  135. - (const char *) fontName;
  136. - (double) fontSize;
  137.  
  138. - (BOOL) guru;
  139. - (BOOL) showSeconds;
  140. - (BOOL) showDate;
  141. - (BOOL) overviewOnLaunch;
  142. - (BOOL) notepadOnLaunch;
  143. - (BOOL) eventLogOnLaunch;
  144. - (BOOL) todayOnLaunch;
  145. - (BOOL) militaryTime;
  146. - (BOOL) playAlarm;
  147. - (BOOL) todayShowTime;
  148.  
  149. - (NXRect *) overviewFrame;    // Return the default frame (window)
  150. - (NXRect *) eventLogFrame;    // size for these windows
  151. - (NXRect *) notepadFrame;
  152. - (NXRect *) todayFrame;
  153.  
  154.  
  155. // ==================
  156. // These are for IB
  157. // ==================
  158.  
  159. - setAlarmSoundForm: anObject;
  160. - setCassandra: anObject;
  161. - setGuruButton: anObject;
  162. - setShowSecondsButton: anObject;
  163. - setShowDateButton: anObject;
  164. - setTodayShowTimeButton: anObject;
  165.  
  166. - setOverviewOnLaunchButton : anObject;
  167. - setNotepadOnLaunchButton : anObject;
  168. - setEventLogOnLaunchButton : anObject;
  169. - setTodayOnLaunchButton : anObject;
  170.  
  171. - setClockFaceMatrix: anObject;
  172. - setMilitaryTimeButton:anObject;
  173. - setShowAllButton:anObject;
  174. - setClockTypeButton: anObject;
  175.  
  176. - setStopButton:anObject;
  177. - setSetButton:anObject;
  178. - setPlayButton:anObject;
  179.  
  180. - setVolumeButton: anObject;
  181. - setVolumeTextField: anObject;
  182. - setVolumeSlider: anObject;
  183. @end
  184.